How to connect the circuit see another blog post:"using Raspberry Pi to control stepper motor--pythony language"/******************************************************* File name:stepmotor.c* Author:jason Dai* date:20 15/01/26******************************************************/#include Compile:GCC Stepmotor.c-o STEP
The following accessories are used:Raspberry Pi 3 * *Brushless ESC 30A *Brushless Motor A2212 1400kv *7.4V Power Supply * *5V Power Supply * *Connecting Wire several
The simple connection diagram is as follows:
Code:
Import Rpi.gpio as Gpio
import time, sys
#我用的第12个引脚
pin =
Gpio.setmode (gpio). BOARD)
Gpio.setup (PIN, Gpio. Out)
#频率设置为400Hz
p = gpio. PWM (
: ili9325_gpio_driver_rpi.diff
You can also download it from my resources:
Http://download.csdn.net/detail/canyue102/6735059
This patch is based on the 3.6 kernel. different versions of the kernel may be different. Just change it.
First, put the diff file under the kernel root directory, and the terminal enters the directory:
patch -p1
Then the source code of the TFT kernel is added to the kernel.
make menuconfigYou can see the ILI9325 option und
0. Preface
This article describes how to install OpenCV in the Raspberry Pi by compiling the source code, and a simple example of how to use OpenCV. For more information, please refer to-"Raspberry Pi Study notes-index Blog"1. Download several dependencies it is a good idea
Python implements the example code of Raspberry Pi WiFi disconnection automatic reconnection, pythonwifi
Enable Automatic reconnection of Wi-Fi disconnection. The principle is to use Python to monitor whether the network is disconnected. If the network is disconnected, restart the network service.
1. Put the Python code
the following two lines of code:http. Handle ("/", HTTP. Fileserver (http. Dir ("HTML")))http. Listenandserve ("0.0.0.0:8080", nil)Step 4: The target environment is modified to CROSS-ARM6, according to "Ctrl+b" compiled, the generated execution file is the source directory "Test", no suffixStep 5: Copy "Test" to your arm Development Board (Raspberry Pi Raspberrypi, Orange pie Orangepi), and authorize: sudo
Realize the WiFi disconnection automatically, the principle is to use Python to monitor whether the network is disconnected, if the disconnection will restart the network service. Next to everyone to share the implementation of code, need to refer to the friend
1.Python code autowifi.py, placed in the/HOME/PI directory:
#!/usr/bin/pythonimportos, Time whiletru
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.